package pojo;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import java.util.List;

public class KClass implements ApplicationContextAware {
    public KClass() {
    }

    public KClass(List<Student> studentList) {
        this.studentList = studentList;
    }

    private List<Student> studentList;

    public List<Student> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<Student> studentList) {
        this.studentList = studentList;
    }

    @Override
    public String toString() {
        return "MyClass::" + studentList.toString();
    }
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        //studentList = new ArrayList<>(applicationContext.getBeansOfType(Student.class).values());
    }
}
